package cn.czxy.domain;

import java.io.Serializable;

/**
 * @author lixinghua@itcast.cn
 * @version 1.0
 * @date 2019/4/13
 */
public class Person implements Serializable {
    /**用户对象*/
    private cn.czxy.domain.User User;
    /**用户名称*/
    private String callname;
    /**用户年纪*/
    private String age;
    /**用户邮箱*/
    private String email;
    /**用户籍贯*/
    private String address;
    /**用户爱好*/
    private String hobby;
    /**用户说明信息*/
    private String message;
    /**用户登录名*/
    private String userName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Person person = (Person) o;

        return userName != null ? userName.equals(person.userName) : person.userName == null;
    }

    @Override
    public int hashCode() {
        return userName != null ? userName.hashCode() : 0;
    }

    @Override
    public String toString() {
        return "Person{" +
                "User=" + User +
                ", callname='" + callname + '\'' +
                ", age='" + age + '\'' +
                ", email='" + email + '\'' +
                ", address='" + address + '\'' +
                ", hobby='" + hobby + '\'' +
                ", message='" + message + '\'' +
                ", userName='" + userName + '\'' +
                '}';
    }

    public Person(cn.czxy.domain.User user, String callname, String age, String email, String address, String hobby, String message, String userName) {
        User = user;
        this.callname = callname;
        this.age = age;
        this.email = email;
        this.address = address;
        this.hobby = hobby;
        this.message = message;
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Person() {
    }

    public cn.czxy.domain.User getUser() {
        return User;
    }

    public void setUser(cn.czxy.domain.User user) {
        User = user;
    }

    public String getCallname() {
        return callname;
    }

    public void setCallname(String callname) {
        this.callname = callname;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getHobby() {
        return hobby;
    }

    public void setHobby(String hobby) {
        this.hobby = hobby;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
